package com.gitee.dictionary.init;

import com.gitee.dictionary.cache.DictionaryEnumCache;
import org.springframework.boot.CommandLineRunner;

/**
 * @author <a href="mailto:lin-mt@outlook.com">lin-mt</a>
 */
public class InitDictionaryEnums implements CommandLineRunner {
    
    private final DictionaryEnumCache dictionaryEnumCache;
    
    public InitDictionaryEnums(DictionaryEnumCache dictionaryEnumCache) {
        this.dictionaryEnumCache = dictionaryEnumCache;
    }
    
    @Override
    public void run(String... args) {
        this.dictionaryEnumCache.cacheDictionaryEnums();
    }
}
